<!DOCTYPE html>
<html lang="en">

	<head>
		<title>重庆农气-运行监控子系统</title>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="css/fullcalendar.css" />
		<link rel="stylesheet" href="css/matrix-style.css" />
		<link rel="stylesheet" href="css/matrix-media.css" />
		<link href="font-awesome/css/font-awesome.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/jquery.gritter.css" />
		<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="css/monitor.css" />
		<link rel="stylesheet" href="css/box_style.css" />
		<link rel="stylesheet" href="css/index.css" />
		<style>	
			body {
				line-height: inherit;
			}
			ul, p {
				margin: 0;
				padding: 0;
			}
			.login{
				margin-top: -65px !important;
			}
			.align-center {
				text-align: center;
			}
			.information{
				width: 100%;
				padding-top: 10px;
				position: relative;
			}
			.personal{
				width: 90%;
				height: 300px;
				margin: 10px auto;
			}
			.left{
				width: 12%;
				height: 62%;
				overflow: hidden;
				margin: 2.4% 2%;
			}
			.left img{
				width: 100%;
			}
			.cent{
				width: 30%;
				margin-top: 2.4%;
				margin-right: 2%;
			}
			.right{
				width: 50%;
				margin-top: 2.4%;
			}
			.cent span, .right span{
				font-weight: 600;
			}
			.left, .cent, .right{
				float: left;
			}
			.right p:first-child span{
				padding-right: 20px;
				border-bottom: 1px solid #ccc;
			}
			.right p:last-child{
				height: 52%;
				line-height: 24px;
				text-indent: 2em;
				overflow: hidden; /*自动隐藏文字*/
			    text-overflow: ellipsis;/*文字隐藏后添加省略号*/
			}
			.infos{
				width: 90%;
				height: 350px;
				margin: 0 auto;
				margin-top: 20px;
			}
			.release{
				float: left;
			}
			.advisory{
				float: right;
			}
			.advisory h{
				float: left;
			}
			.release, .advisory{
				width: 49%;
				height: 350px;
				margin-bottom: 20px;
			}
			.personal, .release, .advisory{
				background: #fff;
				box-shadow: 0 0 5px #333;
				overflow: hidden;
			}
			.head{
				width: 100%;
				height: 30px;
				border-bottom: 1px solid #ccc;
			}
			.head p{
				width: 120px;
				font-size: 16px;
				margin: 0;
				margin-left: 20px;
				text-indent: 12px;
				line-height: 29px;
				border-left: 5px solid #ccc;
				border-bottom: 1px solid #ccc;
			}
			.contents{
				padding: 15px;
				height: 305px;
				overflow-y: scroll;
			}
			.release .contents li {
				width: 100%;
				height: 60px;
				margin-bottom: 10px;
			}
			.release .contents li a{
				display: inline-block;
				width: 100%;
				height: 100%;
			}
			.release .contents li h {
				width: 100%;
				height: 30px;
				line-height: 30px;
				background-color: #f5f8fa;
			}			
			.release .contents li p {
				float: left;
				width: 70%;
				overflow: hidden; /*自动隐藏文字*/
			    text-overflow: ellipsis;/*文字隐藏后添加省略号*/
			    white-space: nowrap;/*强制不换行*/				
			}
			.release .contents li span {
				line-height: 30px;
			}
			.contents p{
				width: 100%;
				height: 30px;
				overflow: hidden;
				font-size: 14px;
				line-height: 30px;
			}
			.qestion{
				height: 60px;
				margin-bottom: 10px;
			}
			.conl{
				float: left;
				line-height: 30px;
				background: #f5f8fa;
			}	
			.conr{
				float: right;
			}
			.contt{
				display: inline-block;
				width: 60%;
				overflow: hidden; /*自动隐藏文字*/
			    text-overflow: ellipsis;/*文字隐藏后添加省略号*/
			    white-space: nowrap;/*强制不换行*/
			}
			.times{
				float: right;
			}
			#footer{
				background: none repeat scroll 0 0 #eeeeee;
			}
		</style>
	</head>

	<body class="container">
		<div class="header">
			<div class="top"></div>
			<ul class="nav">
				<li><a href="index.html">首页</a></li>
				<li><a href="temp.html">气温监测</a></li>
				<li><a href="precipitation.html">降水监测</a></li>
				<li><a href="soil.html">墒情监测</a></li>
				<li><a href="product.html">产品统计</a></li>
				<li><a href="vip.html">大户分布</a></li>
				<li><a href="farmland.html">农田分布</a></li>
				<li><a href="agrinfo.html">农情分布</a></li>
				<li><a href="expert.html" class="click">专家风采</a></li>
				<li><a href="state.html">运行状态</a></li>
			</ul>
			<div class="login">
				<a href="javascript:void(0);" id="login">登录</a>
				<a href="javascript:void(0);" id="exit">退出登录</a>
			</div>
		</div>
		<div id="content">
			<div class="information">
				<div class="personal">
					
				</div>
				<div class="infos">
					<div class="release">
						<div class="head">
							<p>产品发布记录</p>
						</div>
						<div class="contents">
							<ul></ul>
						</div>
					</div>
					<div class="advisory">
						<div class="head">
							<p>咨询记录</p>
						</div>
						<div class="contents">
							
						</div>
					</div>
				</div>
			</div>
		</div>
		<div id="footer"> 2016 &copy; 重庆市气象局</div>
			<script src="js/excanvas.min.js"></script>
			<script src="js/jquery.min.js"></script>
			<script src="js/jquery.ui.custom.js"></script>
			<script src="js/bootstrap.min.js"></script>
			<script src="js/matrix.js"></script>
			<script src="libs/SuperMap.Include.js"></script>
			<script src="js/monitor.js"></script>
			<script src="js/WH.js"></script>
			<script type="text/javascript" src="js/jquery.cookie.js"></script>
			<script type="text/javascript" src="js/jquery.XYTipsWindow.2.8.js"></script>
			<script src="js/index.js"></script>
			<script type="text/javascript">
			
			function openShow(){
					alert(q)
			
				//layer.open({
				  //title: q,
				  //content: '666'
				//});   
			}
				$(document).ready(function() {
				
					var storage=window.localStorage;
						if (storage.boolea == 'false') {
							$("#login").show();
							$("#exit").hide();
							$("#login").click(function() {
								$.XYTipsWindow({
									___title: "登录",
									___content: "iframe:login.html",
									___width: "460",
									___height: "150",
									___showbg: true,
									___drag: "___boxTitle"
								});
							});
						} else {
							$("#login").hide();
							$("#exit").show();
							$("#exit").click(function() {
								monitor.loginout();
							});
						}
				});
				(function($){
					$.getUrlParam = function(name) {
					    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); 
					    var r = window.location.search.substr(1).match(reg); 
					    if (r!=null) return unescape(r[2]); return null;
					} 
				})(jQuery);
				$(function(){
					var $url = "http://183.230.183.18:8088/SPPMDataService/services/data/query";
					var expertID = $.getUrlParam('page');
					function personal(){
						$.ajax({
							url: $url,
							type: 'POST',
							data: {param:'{"Function":"getexpertInfo","CustomParams":{expertID:'+ expertID +'},"Type":2}'},
							dataType: 'json',
							success: function(data){
								for(var i = 0; i < data.length; i++){
									var html_p =	"<div class=\"head\">" +
														"<p>专家信息</p>" +
													"</div>" +
													"<div class=\"left\">" +
														"<img src='http://183.230.183.18:8088/"+ data[i].HeadImage +"' />" +
													"</div>" +
													"<div class=\"cent\">" +
														"<p><span>姓名：</span>"+ data[i].showName +"</p>" +
														"<p><span>单位：</span>"+ data[i].unit +"</span></p>" +
														"<p><span>专家类型：</span>"+ data[i].kind +"</span></p>" +
														"<p><span>关注地区：</span>"+ data[i].departname +"</span></p>" +
														"<p><span>联系方式：</span>"+ data[i].mobile +"</span></p>" +
													"</div>" +
													"<div class=\"right\">" +
														"<p><span>专家简介：</span></p>" +
														"<p>"+ data[i].introduction +"</p>" +
													"</div>";
									$(".personal").append(html_p);
								};
							}
						});
					};
					personal();

					function release(){
						$.ajax({
							url: $url,
							type: 'POST',
							data: {param:'{"Function":"getexpertproduct","CustomParams":{expertID:'+ expertID +'},"Type":2}'},
							dataType: 'json',
							success: function(data){
								for(var i = 0; i < data.length; i++){
									var html_r = "<li><a href='javascript:;' onclick='openShow()'><h>"+ data[i].title +"</h><p>"+ data[i].content +"</p><span class=\"times\">"+ data[i].createTime +"</span></a></li>";
									$(".release .contents").find('ul').append(html_r);
								};
							}
						});
					};
					release();

					function advisory(){
						$.ajax({
							url: $url,
							type: 'POST',
							data: {param:'{"Function":"getexpertadvInfo","CustomParams":{expertID:'+ expertID +'},"Type":2}'},
							dataType: 'json',
							success: function(data){
						
								for(var i = 0; i < data.length; i++){
								var q=data[i].qestion;
								var c=data[i].comment;
									if(data[i].comment == ""){
										var html_a = "<div class=\"qestion\"  onclick='openShow("+q+","+c+")'><p class=\"conl\" ><h>Q：</h>"+ data[i].qestion +"<span class=\"times\">"+ data[i].uploadTime +"</span></p></div>";
										$(".advisory .contents").append(html_a);
									}else{
										var html_a = "<div class=\"qestion\" onclick='openShow("+q+","+c+")'><p class=\"conl\" ><h>Q：</h>"+ data[i].qestion +"<span class=\"times\">"+ data[i].uploadTime +"</span></p>" +
													 "<p class=\"conr\"><h>A：</h><span class=\"contt\">"+ data[i].comment +"</span><span class=\"times\">"+ data[i].commentTime +"</span></p></div>";
										$(".advisory .contents").append(html_a);
									};
								};
							}
						});
					};
					advisory();
				});
			</script>
	</body>
</html>